package com.bcbim.api_web.modelFile.controller;

import com.bcbim.common.response.vo.ReturnMsg;
import com.bcbim.operation_maintenance_interface.model_file.service.ModelFileService;
import com.bcbim.operation_maintenance_interface.model_file.vo.ModelFileVO;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @version V 1.0.0
 * @Description：模型文件controller
 * @Author: haomeijie
 * @Date: 2022/3/17 15:56
 **/
@RestController
@RequestMapping("/model")
public class ModelFileController {

    @Reference(protocol = "dubbo", group = "modelFile", version = "1.0.0")
    private ModelFileService modelFileServiceImpl;

    /**
     * 获取全部模型
     *
     * @Author: haomeijie
     * @Date: 2022/3/17 16:44
     */
    @RequestMapping("/getModel")
    public ReturnMsg getModel(String buildId) {
        //调用服务
        List<ModelFileVO> modelFileVO = modelFileServiceImpl.getModelByBuildId(buildId);
        return ReturnMsg.consSuccess(modelFileVO);
    }
}
